package com.fz.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * Created by bai on 2017/7/5.
 */
@Component @Data @AllArgsConstructor
public class Teacher {
    @Value("李老师")
    private String name;
    @Value("金水区")
    private String address;
    public Teacher(){
        System.out.println("teacher 无参构造方法......");
    }

    @PostConstruct
    public void init(){
        System.out.println("teacher init 方法....");
    }

    public void show(){
        System.out.println("teacher show 方法.....");
    }

    public void a(){
        System.out.println("teacher a 方法.....");
    }
    @PreDestroy
    public void destory(){
        System.out.println("teacher destory 方法.......");
    }


}
